package com.jmi.chmtrace.back.Controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/trace")
public class TraceController {

    // TODO 生产商添加溯源信息
    @GetMapping("/initChm")
    @ResponseBody
    public JSONObject initChm(@RequestParam String traceCode){
        JSONObject resp = new JSONObject();

        return resp;
    }

    // TODO 运输商运输流程溯源信息
    @GetMapping("/addTransport")
    @ResponseBody
    public JSONObject addTransport(@RequestParam String traceCode){
        JSONObject resp = new JSONObject();

        return resp;
    }

    // TODO 经销商添加经销信息
    @GetMapping("/addSell")
    @ResponseBody
    public JSONObject addSell(@RequestParam String traceCode){
        JSONObject resp = new JSONObject();

        return resp;
    }

    // TODO 消费者获取溯源信息
    @GetMapping("/getTrace")
    @ResponseBody
    public JSONObject getTrace(@RequestParam String traceCode){
        JSONObject resp = new JSONObject();

        return resp;
    }
}
